package com.ddch.testioc;

import android.view.View;
import android.widget.Button;
import android.widget.Toast;

import com.ddch.testioc.xutils.ContentView;
import com.ddch.testioc.xutils.OnClick;
import com.ddch.testioc.xutils.ViewInject;
@ContentView(value = R.layout.activity_main)
public class MainActivity extends BaseActivity  {
    @ViewInject(R.id.id_btn)
    private Button mBtn1;
    @ViewInject(R.id.id_btn02)
    private Button mBtn2;
    @OnClick({R.id.id_btn, R.id.id_btn02})
    public void clickBtnInvoked(View view){
        switch (view.getId()){
            case R.id.id_btn:
                mBtn1.setText("我被点击了");
                Toast.makeText(MainActivity.this, "Why do you click me ?", Toast.LENGTH_SHORT).show();
                break;
            case R.id.id_btn02:
                mBtn2.setText("你被点击了");
                Toast.makeText(MainActivity.this, "I am sleeping !!!", Toast.LENGTH_SHORT).show();
                break;
            default:
                break;
        }
    }
}
